<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns, CPP, Rank2Types #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      : Data.Text.Lazy.Builder</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   : (c) 2013 Bryan O'Sullivan</span><span>
</span><span id="line-8"></span><span class="hs-comment">--               (c) 2010 Johan Tibell</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- License     : BSD-style (see LICENSE)</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  : Johan Tibell &lt;johan.tibell@gmail.com&gt;</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability : portable to Hugs and GHC</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Efficient construction of lazy @Text@ values.  The principal</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- operations on a @Builder@ are @singleton@, @fromText@, and</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- @fromLazyText@, which construct new builders, and 'mappend', which</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- concatenates two builders.</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- To get maximum performance when building lazy @Text@ values using a</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- builder, associate @mappend@ calls to the right.  For example,</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- prefer</span><span>
</span><span id="line-22"></span><span class="hs-comment">--</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- &gt; singleton 'a' `mappend` (singleton 'b' `mappend` singleton 'c')</span><span>
</span><span id="line-24"></span><span class="hs-comment">--</span><span>
</span><span id="line-25"></span><span class="hs-comment">-- to</span><span>
</span><span id="line-26"></span><span class="hs-comment">--</span><span>
</span><span id="line-27"></span><span class="hs-comment">-- &gt; singleton 'a' `mappend` singleton 'b' `mappend` singleton 'c'</span><span>
</span><span id="line-28"></span><span class="hs-comment">--</span><span>
</span><span id="line-29"></span><span class="hs-comment">-- as the latter associates @mappend@ to the left. Or, equivalently,</span><span>
</span><span id="line-30"></span><span class="hs-comment">-- prefer</span><span>
</span><span id="line-31"></span><span class="hs-comment">--</span><span>
</span><span id="line-32"></span><span class="hs-comment">--  &gt; singleton 'a' &lt;&gt; singleton 'b' &lt;&gt; singleton 'c'</span><span>
</span><span id="line-33"></span><span class="hs-comment">--</span><span>
</span><span id="line-34"></span><span class="hs-comment">-- since the '&lt;&gt;' from recent versions of 'Data.Monoid' associates</span><span>
</span><span id="line-35"></span><span class="hs-comment">-- to the right.</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Text.Lazy.Builder</span><span>
</span><span id="line-40"></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="hs-comment">-- * The Builder type</span></span><span>
</span><span id="line-41"></span><span>     </span><span class="annot"><a href="Data.Text.Internal.Builder.html#Builder"><span class="hs-identifier">Builder</span></a></span><span>
</span><span id="line-42"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#toLazyText"><span class="hs-identifier">toLazyText</span></a></span><span>
</span><span id="line-43"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#toLazyTextWith"><span class="hs-identifier">toLazyTextWith</span></a></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span>     </span><span class="annot"><span class="hs-comment">-- * Constructing Builders</span></span><span>
</span><span id="line-46"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier">singleton</span></a></span><span>
</span><span id="line-47"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#fromText"><span class="hs-identifier">fromText</span></a></span><span>
</span><span id="line-48"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#fromLazyText"><span class="hs-identifier">fromLazyText</span></a></span><span>
</span><span id="line-49"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#fromString"><span class="hs-identifier">fromString</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span>     </span><span class="annot"><span class="hs-comment">-- * Flushing the buffer state</span></span><span>
</span><span id="line-52"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#flush"><span class="hs-identifier">flush</span></a></span><span>
</span><span id="line-53"></span><span>   </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html"><span class="hs-identifier">Data.Text.Internal.Builder</span></a></span><span>
</span><span id="line-56"></span></pre></body></html>